#include "../include/Tools.hpp"

void setCursorXY(int x, int y){
    cout << "\x33[y;xH" << endl;
}

void setCursorOrigin(){
    setCursorXY(0, 0);
}

void setCursorHide(){
    cout << "\x33[?25l" << endl;
}

void setCursorShow(){
    cout << "\x33[?25h" << endl;
}

void setReverseOn(){
    cout << "\x33[7m" << endl;
}

void setReverseOff(){
    cout << "\x33[7m" << endl;
}

void drawCharacter(CHARACTER ch, int scaleY){
    while(scaleY --){
        cout << "\x33[38;2;" << 
            ch.foreGround.R << ';' << 
            ch.foreGround.G << ';' <<
            ch.foreGround.B << 'm' <<
            "\x33[48;2;" <<
            ch.backGround.R << ';' << 
            ch.backGround.G << ';' <<
            ch.backGround.B << 'm' << ch.c;
    }
}